package com.white.databasesbackup.expand;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * 有事务的方式执行
 * </p>
 *
 * @author huangzy
 * @since 2022/5/6
 */
@Component
public class RunnableTransactionalSupported {

    @Transactional(rollbackFor = Throwable.class)
    public void run(Runnable runnable) {
        runnable.run();
    }
}
